<template>
  <div></div>
</template>

<script>
import { isEqual } from '@/utils'

export default {
  name: '',
  data() {
    return {
      data: { a: 1, b: 2 }
    }
  },

  components: {},

  created() {},

  mounted() {
    // setInterval(() => {
    //   setTimeout(() => {
    //     this.data = { a: 1, b: 2 }
    //   }, 1000)
    // }, 1000)
  },

  methods: {},
  watch: {
    data: function(val, oldVal) {
      if (!isEqual(val, oldVal)) {
        console.log(val)
        console.log(oldVal)
      } else {
        console.log(val)
      }
    }
  }
}
</script>

<style lang='scss' scoped>
</style>